<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<!doctype html>
<html class="no-js" lang="">
<head>

    <jsp:include page="layout/head.jsp">
        <jsp:param name="title" value="blog"/>
        <jsp:param name="cssName" value="index"/>
    </jsp:include>

</head>
<body>

<jsp:include page="layout/nav.jsp"/>

<div class="banner">
    <h1>从点点滴滴做起</h1>
    <h2>保护环境， 绿色出行，从我做起</h2>
</div>
<div class="container">
    <div class="main">
        <c:if test="${empty page.list}">暂无文章</c:if>
        <c:forEach items="${page.list}" var="topic">

            <article>
                <div class="image-img">
                    <a href="#"><p class="category">${topic.category.name}</p></a>
                    <a href="${pageContext.request.contextPath}/topic/get?id=${topic.id}"><img src="${topic.photo.img}" alt=""></a>
                </div>
                <div class="article-descr">
                    <h2>
                        <a href="#"> ${topic.title}</a>
                    </h2>
                    <p>
                            ${topic.describe}
                    </p>
                </div>
            </article>
        </c:forEach>
    </div>

    <jsp:include page="layout/right.jsp"/>
</div>

<jsp:include page="layout/footer.jsp"/>

</body>
</html>
